﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TSVNAddin.Core
{
	public class RootCommandContext : IPathCommandContext
	{
		private readonly WorkingContext _WorkingContext;

		public RootCommandContext(WorkingContext workingContext)
		{
			_WorkingContext = workingContext;
		}

		public CommandStatus GetCommandStatus()
		{
			if (!_WorkingContext.CanExecutePathCommands())
				return CommandStatus.Disabled;

			return CommandStatus.Enabled;
		}

		public string GetWorkingPath()
		{
			return _WorkingContext.GetWorkingRoot();
		}
	}
}
